

#ifndef QUERYPREPROCESSOR_H
#define QUERYPREPROCESSOR_H

#include "TNode.h"
#include "type.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;

class QueryPreprocessor {
public:
	static TNode parse(string);
	static vector<string> tokeniseTest(string);
private:
	static const string LETTERS;// = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	static const string PUNCT;// = "_()<>;,.\"+-*";
	static const string DIGITS;// = "1234567890";
	static vector<string> tokenList;
	static string nextToken;
	static vector<string> tokenise(string);
	static bool isPresent(string, char);
	static bool isInteger(string);
	static bool isIdent(string);
	static bool isName(string);
	static bool isSynonym(string);
	static string getToken();
	static TNode query();
	static TNode select();
	static void match(string);
	static TNode result();
	static void tuple();
	static TNode elem();
	static TNode synonym();
	static void entRef();
	static TNode stmtRef();
	static TNode varRef();
	static void lineRef();
	static void attrRef();
	static void declaration();
	static TYPE designEntity();
	static TNode suchThat();
	static TNode relRef();
	static TNode modifiesS();
	static void modifiesP();
	static TNode usesS();
	static void usesP();
	static void calls();
	static void callsT();
	static TNode parent();
	static TNode parentT();
	static TNode follows();
	static TNode followsT();
	static void next();
	static void nextT();
	static void affects();
	static void affectsT();
	static TNode pattern();
	static TNode patt();
	static TNode pAssign();
	static TNode pWhile();
	static TNode pIf();
	static TNode exprSpec();
	static TNode expr();
	static void with();
};

#endif